<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <link rel="stylesheet" href="../css/reset.css">
    <link rel="stylesheet" href="../css/base.css">
    <link rel="stylesheet" href="../css/new.css">
</head>
<body>
    <header></header>
    <div class="main container">
        <div class="main-top">
        <img src="../img/new.webp" alt="">
        <span>--新品首发--</span>
        </div>
        <ul class="paging_list"></ul>
    </div>
    <div class="paging_content">
        <div class="paging_first">首页</div>
        <div class="paging_up">上一个</div>
        <div class="paging_btn"></div>
        <div class="paging_down">下一个</div>
        <div class="paging_last" id="">尾页</div>
    </div>
    <footer></footer>

    <script src="../libs/jquery.min.js"></script>
    <script src="../libs/jquery-paging.js"></script>
    <script src="../libs/cookie.js"></script>
    <script src="../js/pAjax.js"></script>
    <script src="../js/new.js"></script>
    <script>
        $('header').load('../html/header.html',()=>{
            let login = document.querySelector('.login')
            let sp1 = document.querySelector('.sp1')
            let sp2 = document.querySelector('.sp2')
            if(getCookie('username')){
                login.style.display = 'none'
                sp1.style.display = 'block'
                sp2.style.display = 'block'
                sp1.innerHTML = `欢迎：${getCookie('username')}`
                sp2.onclick = ()=>{
                    login.style.display = 'block'
                    sp1.style.display = 'none'
                    sp2.style.display = 'none'
                    delCookie('username')
                    delCookie('password')
                    localStorage.clear()
                    window.totalNum()
                }
            }
        })
        $('footer').load('../html/footer.html')
    </script>
</body>
</html>